import request from '@/utils/request'

// 查询入职管理列表
export function listHrEntry(query) {
  return request({
    url: '/entry/hrEntry/list',
    method: 'get',
    params: query
  })
}

// 查询入职管理列表
export function listHrEntryIsNotBecome(query) {
  return request({
    url: '/entry/hrEntry/list/is/not/become',
    method: 'get',
    params: query
  })
}

// 查询入职管理详细
export function getHrEntry(id) {
  return request({
    url: '/entry/hrEntry/' + id,
    method: 'get'
  })
}

// 保存入职管理
export function saveHrEntry(data) {
  return request({
    url: '/entry/hrEntry/save',
    method: 'post',
    data: data
  })
}

// 删除入职管理
export function delHrEntry(id) {
  return request({
    url: '/entry/hrEntry/' + id,
    method: 'delete'
  })
}

// 导出入职管理
export function exportHrEntry(query) {
  return request({
    url: '/entry/hrEntry/export',
    method: 'get',
    params: query
  })
}

// 校验录入的员工是否重复
export function checkUserId(query) {
  return request({
    url: '/entry/hrEntry/check/user/',
    method: 'get',
    params: query
  }).then(result => result.code === 200 && result.data)
}
